<template>
    <div class="login-form">
        <tr>
            <td>导演能力</td>
            <td> <input type="text" v-model="directorcapacity"></td>
        </tr>
        <tr>
            <td>演员</td>
            <td> <input type="text" v-model="starring"></td>
        </tr>
        <tr>
            <td>导演能力</td>
            <td> <input type="text" v-model="screen"></td>
        </tr>
        <tr>
            <td>导演能力</td>
            <td> <input type="text" v-model="director"></td>
        </tr>
        <tr>
            <td>导演能力</td>
            <td> <input type="text" v-model="actor"></td>
        </tr>
        <tr>
            <td>导演能力</td>
            <td> <input type="text" v-model="enditor"></td>
        </tr>
        <tr>
            <td> <button type="submit" value="Submit" @click="query">提交</button></td>
            <td> <button type="reset" value="Reset">取消</button></td>
        </tr>
    </div>
</template>

<script>
    import {
        querysave
    } from "@/api/film";
    export default {
        name: "predict",
        data() {
            return {
                directorcapacity: '',
                starring: '',
                screen: '',
                director: '',
                actor: "",
                enditor: '',
            };
        },
        methods: {
            query() {
                let data = {
                    directorcapacity: this.directorcapacity,
                    starring: this.starring,
                    screen: this.screen,
                    director: this.director,
                    actor: this.actor,
                    enditor: this.enditor
                };
                console.log(data);
                querysave(data).then(res => {})
            }
        }
    }
</script>

<style>
    .login-form {
        margin-top: 100px;
        margin-left: 100px;
    }
</style>